{extend name="app/shop/view/base.html"/}
{block name="resources"}
<style>
	.layui-table .layui-btn {
		justify-content: flex-end;
		padding-right: 0px;
	}

	.name {
		display: flex;
		align-content: center;
	}

	.name img {
		max-width: inherit;
		width: 60px;
		height: 60px;
		margin-right: 10px;
	}
</style>
{/block}
{block name="main"}
<div class="layui-form card-brief" lay-filter="storeform">
	<div class="layui-card">
		<div class="layui-elem-quote">基本信息</div>
		<div class="layui-row">
			<div class="layui-col-md3">
				<div class="layui-form-item">
					<label class="layui-form-label">操作人：</label>
					<div class="layui-input-block">{$detail.operater_name}</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">调拨时间：</label>
					<div class="layui-input-block">{:time_to_date($detail.allot_time)}</div>
				</div>
			</div>

			<div class="layui-col-md3">

				<div class="layui-form-item">
					<label class="layui-form-label">出库门店：</label>
					<div class="layui-input-block">{$detail.output_store_name}</div>
				</div>
				{notempty name="$detail.out_info"}
				<div class="layui-form-item">
					<label class="layui-form-label">出库时间：</label>
					<div class="layui-input-block">{$detail.out_info.create_time}</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">经办人：</label>
					<div class="layui-input-block">{$detail.out_info.operater_name}</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">状态：</label>
					<div class="layui-input-block">{$detail.out_info.status_name}</div>
				</div>
				{if $detail.out_info.verifier_name }
				<div class="layui-form-item">
					<label class="layui-form-label">审核人：</label>
					<div class="layui-input-block">{$detail.out_info.verifier_name}</div>
				</div>
				{/if}
				{if $detail.out_info.audit_time }
				<div class="layui-form-item">
					<label class="layui-form-label">审核时间：</label>
					<div class="layui-input-block">{$detail.out_info.audit_time}</div>
				</div>
				{/if}
				{if $detail.out_info.status == -1}
				<div class="layui-form-item">
					<label class="layui-form-label">拒绝理由：</label>
					<div class="layui-input-block">{$detail.out_info.refuse_reason}</div>
				</div>
				{/if}
				{/notempty}
			</div>

			<div class="layui-col-md3">

				<div class="layui-form-item">
					<label class="layui-form-label">入库门店：</label>
					<div class="layui-input-block">{$detail.input_store_name}</div>
				</div>
				{notempty name="$detail.input_info"}
				<div class="layui-form-item">
					<label class="layui-form-label">入库时间：</label>
					<div class="layui-input-block">{$detail.input_info.create_time}</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">经办人：</label>
					<div class="layui-input-block">{$detail.input_info.operater_name}</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">状态：</label>
					<div class="layui-input-block">{$detail.input_info.status_name}</div>
				</div>
				{if $detail.input_info.verifier_name }
				<div class="layui-form-item">
					<label class="layui-form-label">审核人：</label>
					<div class="layui-input-block">{$detail.input_info.verifier_name}</div>
				</div>
				{/if}
				{if $detail.input_info.audit_time }
				<div class="layui-form-item">
					<label class="layui-form-label">审核时间：</label>
					<div class="layui-input-block">{$detail.input_info.audit_time}</div>
				</div>
				{/if}
				{if $detail.input_info.status == -1}
				<div class="layui-form-item">
					<label class="layui-form-label">拒绝理由：</label>
					<div class="layui-input-block">{$detail.input_info.refuse_reason}</div>
				</div>
				{/if}
				{/notempty}
			</div>

		</div>
	</div>
	<div class="layui-card">
		<div class="layui-elem-quote">商品明细</div>
		<table class="layui-table order_goods_list" lay-filter="order_goods" lay-skin="line"
		       lay-filter="order_goods_list">
			<colgroup>
				<col width="30%"/>
				<col width="10%"/>
				<col width="10%"/>
				<col width="10%"/>
				<col width="10%"/>
				<col width="10%"/>
			</colgroup>
			<thead>
			<tr>
				<th>商品名称/条形码</th>
				<th>商品规格</th>
				<th>单位</th>
				<th>数量</th>
				<th>单价(元)</th>
				<th>金额(元)</th>
			</tr>
			</thead>
		</table>
		<table class="layui-table order_goods_list order_goods_list-bottom" lay-filter="order_goods" lay-skin="line"
		       lay-filter="order_goods_list">
			<colgroup>
				<col width="30%"/>
				<col width="10%"/>
				<col width="10%"/>
				<col width="10%"/>
				<col width="10%"/>
				<col width="10%"/>
			</colgroup>
			<tbody>
			{foreach $detail.goods_sku_list_array as $k => $v}
			<tr class="table-tr">
				<td class="name">
					<img src="{:img($v.goods_sku_img,'small')}" alt="">
					<span>{$v.goods_sku_name}</span>
				</td>
				<td>{$v.goods_sku_spec}</td>
				<td>{$v.goods_unit}</td>
				<td>{$v.goods_num}</td>
				<td>{$v.goods_price}</td>
				<td>{$v.total_goods_money}</td>
			</tr>
			{/foreach}
			</tbody>
		</table>
		<label style="display: flex;justify-content: flex-end;padding-right: 13px;">合计：共{$detail.goods_count}种商品{$detail.goods_price}件,合计金额：<span
				style="color: #ff0000;">{$detail.goods_total_price}</span></label>
	</div>
</div>
{/block}
{block name="script"}
{/block}